<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type='text/css'>

	body {
		margin-top: 50px;
		text-align: center;
		font-size: 14px;
		font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
		}

	#calendar {
		width: 900px;
		margin: 0 auto;
		}

</style>
<link rel='stylesheet' type='text/css' href='../../../public/stylesheets/fullcalendar.css' />
<script type='text/javascript' src='../../../public/javascripts/jquery_2.js'></script>
<script type='text/javascript' src='../../../public/javascripts/ui.core.js'></script>
<script type='text/javascript' src='../../../public/javascripts/ui.draggable.js'></script>
<script type='text/javascript' src='../../../public/javascripts/fullcalendar.js'></script>
<script type='text/javascript'>

	$(document).ready(function() {
//		var d = new Date();
//		//var y = d.getFullYear();
//                var y ='${year}';
//          	var m = '${month}' -1;
//                $('#one').jGrowl(m);
var itemsBody='${itemsBody}'.split("#");
var startDay='${startDay}'.split("#");
var startMonth='${startMonth}'.split("#");
var startYear='${startYear}'.split("#");
var endDay='${endDay}'.split("#");
var endMonth='${endMonth}'.split("#");
var endYear='${endYear}'.split("#");
var calendarEvents=[];

 for(var i=0;i<itemsBody.length;i=i+1){
                calendarEvents[i] =
                    {id: i+1, title: itemsBody[i],
                        start:new Date(startYear[i],startMonth[i]-1,startDay[i]),
                        end:new Date(endYear[i],endMonth[i]-1,endDay[i])};
          }
                $('#calendar').fullCalendar({
			draggable: true,
			events: calendarEvents
		});

	});

</script>
</head>

<body>
<div id='calendar'></div>
</body>
</html>
